class People{
  float weight = 0.0f;
  float height = 0.0f;
  String name;
  void speak(String s) { System.out.println(s); }
}

class Student extends People{
  int number = 0;
  double add(double a, double b) { return a+b; }
}

public class Example_6_1{
  public static void main(String[] args){
    Student ZhangSan = new Student();
    ZhangSan.weight = 65.9f;
    ZhangSan.height = 182f;
    ZhangSan.name = "张三";
    ZhangSan.number = 201011;
    ZhangSan.speak("我是" + ZhangSan.name + "，我的学号: " + ZhangSan.number);
    System.out.println("我的身高：" + ZhangSan.height + " cm，我的体重：" + ZhangSan.weight + "kg");
    System.out.println("我会做加法：");
    System.out.println("sum = " + ZhangSan.add(23.5, 879.987));
  }
}
